home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1997 February / WPCFEB97.ISO / dxrs / jukebx02.dxr / 00038_Quit Button Script.ls < prev    next >
Encoding:
Text File  |  1996-12-09  |  1.5 KB  |  74 lines

  1. on hExit
  2.   global md1, screen
  3.   if rollOver(45) then
  4.     if the mouseDown then
  5.       if (md1 = "no") or (md1 = "hit") then
  6.         set the memberNum of sprite 45 to 15
  7.         set md1 to "hit"
  8.       end if
  9.     else
  10.       set the memberNum of sprite 45 to 14
  11.       if md1 = "hit" then
  12.         MyExit()
  13.       else
  14.         set md1 to "no"
  15.       end if
  16.     end if
  17.   else
  18.     if the mouseDown then
  19.       if md1 <> "hit" then
  20.         set md1 to "yes"
  21.       end if
  22.     else
  23.       set md1 to "no"
  24.     end if
  25.     set the memberNum of sprite 45 to 14
  26.   end if
  27.   if rollOver(1) and (the castNum of sprite 1 = 1) then
  28.     if the mouseDown then
  29.       repeat while the mouseDown
  30.       end repeat
  31.       set the memberNum of sprite 45 to 15
  32.       set md1 to "hit"
  33.       MyExit()
  34.     end if
  35.   end if
  36.   if rollOver(1) and (the castNum of sprite 1 = 170) then
  37.     if the mouseDown then
  38.       repeat while the mouseDown
  39.       end repeat
  40.       set the memberNum of sprite 45 to 15
  41.       set screen to 5
  42.       MyExit()
  43.     end if
  44.   end if
  45.   updateStage()
  46. end
  47.  
  48. on MyExit
  49.   global screen, md1
  50.   repeat with r = 1 to 3
  51.     sound stop r
  52.   end repeat
  53.   puppetSound(3, 152)
  54.   case screen of
  55.     1:
  56.       set screen to 2
  57.       set md1 to "no"
  58.     2:
  59.       nothing()
  60.       set md1 to "no"
  61.     3:
  62.       unloadMember(member 3, 162)
  63.       repeat with t = 1 to 48
  64.         puppetSprite(t, 1)
  65.       end repeat
  66.       updateStage()
  67.       repeat with t = 1 to 48
  68.         set the locH of sprite t to 2000
  69.       end repeat
  70.       updateStage()
  71.       play done
  72.   end case
  73. end
  74.